# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=rsakeyfind
pkgver=1.0
pkgrel=4
pkgdesc='A tool to find RSA key in RAM.'
groups=('blackarch' 'blackarch-cracker' 'blackarch-forensic')
arch=('x86_64' 'aarch64')
url='http://citp.princeton.edu/memory/code/'
license=('BSD')
makedepends=('make')
source=("http://citpsite.s3-website-us-east-1.amazonaws.com/oldsite-htdocs/memory-content/src/$pkgname-$pkgver.tar.gz"
        'rsakeyfind.patch')
sha512sums=('a92308518d3d7759b36dd452edb9c5f983fb239841f05bdf707aa944edb6aa3fb74187c310b830e96045812686b2bffe93395badc9a428bb40bbee90d9bef55c'
            '25663b588bb332393710baa3d16acb38c13c266d76b6948bf9c9298a382634f013a895d7609259ec8072f5c0ac95f77f8946f4d5e1897c761b30df14300331f8')

prepare() {
  cd $pkgname

  patch -p0 < ../rsakeyfind.patch
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

